cmake_minimum_required(VERSION 3.4.1)
ENABLE_LANGUAGE(ASM)

SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s -O3  -ffunction-sections -fdata-sections -fno-gnu-unique -fpic -fvisibility=hidden")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -O3 -ffunction-sections -fdata-sections -fno-gnu-unique -fpic -fvisibility=hidden")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)


set(CXX_INC_PATH  ${CMAKE_SOURCE_DIR}/src)
include_directories(${CXX_INC_PATH})

############ import libraries ##############
add_library(	libtcl_dualcam_image_depth
		SHARED
		IMPORTED	)

set_target_properties(	libtcl_dualcam_image_depth
			PROPERTIES
			IMPORTED_LOCATION
			${CMAKE_SOURCE_DIR}/libs/libtcl_dualcam_image_depth.so	)

message(STATUS "CMAKE_SOURCE_DIR  ${CMAKE_SOURCE_DIR}")


SET (	CMAKE_CXX_FLAGS "-fopenmp ${CMAKE_CXX_FLAGS}"	)


########### the core part for test modules ###############
SET (	EXECUTABLE_OUTPUT_PATH	${CMAKE_SOURCE_DIR}/libs/	)

add_executable (	depth_test ${CMAKE_SOURCE_DIR}/test/main.cpp	)

target_link_libraries(depth_test libtcl_dualcam_image_depth ${OpenCV_LIBRARIES})
